package com.ywl.demo.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ywl.mvcframework.action.BaseAction;
import com.ywl.mvcframework.annocation.YwlAction;
import com.ywl.mvcframework.annocation.YwlMethod;

/**
 * 用来响应test.do的Action
 * @author wl.yang
 *
 */
@YwlAction(path="/test")
public class TestAction extends BaseAction {

	@YwlMethod("index")
	public String index(HttpServletRequest req, HttpServletResponse resp){
		
		return "/pages/test/index.jsp";
	}
	
	/**
	 * add方法
	 * @param req
	 * @param resp
	 * @return
	 */
	@YwlMethod("add")
	public String add(HttpServletResponse resp){
		return "/pages/test/add.jsp";
	}
	
	/**
	 * add方法
	 * @param req
	 * @param resp
	 * @return
	 */
	@YwlMethod("delete")
	public void delete(HttpServletResponse resp){
		System.out.println("test...delete...");
	}
}
